<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>见微-全媒体记者发稿助手</title>
    <link href="__PUBLIC__/live/css/list-detail.css" rel="stylesheet">
    <!--font awesome-->
    <link rel="stylesheet" href="http://cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css">
    <script src="http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
</head>
<body>
<include file="Public:header" />
    <div class="main-content">
        <div class="wrap">
                <div class="sidebar">
                    <include file="Public:slide" />
                </div>
                <div class="detail">

                </div>
        </div>
    </div>
<div id="mask" unselectable="on"></div>
<script>
(function(){
    $(".detail").css("left",$(".sidebar").position().left + 241);
    $(window).resize(function(){
        $(".detail").css("left",$(".sidebar").position().left + 241);
    })
    $("#searchInput").on('keyup',function(){
        $(".sidebar-list").parent().html($(".sidebar-list").parent().html().replace(/<\/?span.*?>/g,''));

        if($.trim($(this).val()) != ''){
            var reg = new RegExp('('+$.trim($(this).val())+')','g');
            $(".sidebar-list a").each(function(index,item){
                //$(item).find('span')

                var tmp =item.innerHTML;
            
                if(reg.test(tmp)){
                    var i = tmp.replace(reg,'<span class="selected">'+RegExp.$1+'</span>');
                    item.innerHTML= i;
                    $(this).parent().show();
                }else{
                    $(this).parent().hide();
                }
            });
        }else{
           
            $(".sidebar-list").show();
        }
    });

})();
</script>
</body>
</html>



